package com.yanqu.road.entity.systemgroup.newmonopolymarket;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.systemgroup.ResourceServerGroup;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_new_monopoly_market_week_state_data", desc = "新榷场-活动每周全局数据")
public class NewMonopolyMarketWeekStateData extends DataObject {

    @FieldTypeAnnotation(desc = "每周", update = true, select = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "系统分组", update = true)
    private int systemGroupId;

    @FieldTypeAnnotation(desc = "开服天数")
    private int openDays;

    @FieldTypeAnnotation(desc = "区服范围，也是大分组范围")
    private List<Long> serverIdList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "区服范围，内部中分组、内部小分组")
    private Map<Integer, ResourceServerGroup> innerGroupList = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "最大分组id")
    private int maxGroupId;

    @FieldTypeAnnotation(desc = "活跃数")
    private int activeNum;

    @FieldTypeAnnotation(desc = "资源类型，资源点等级对应，npc血量")
    private Map<Integer, Map<Integer, Long>> npcBlood = new HashMap<>();

    @FieldTypeAnnotation(desc = "榷署上次刷新时间(每日重置-只在周日0点重置)")
    private int officeRefreshTime;

    @FieldTypeAnnotation(desc = "王帐上次刷新时间(每日重置-只在周日0点重置)")
    private int kingResGrabRefreshTime;

    @FieldTypeAnnotation(desc = "王宫上次刷新时间(每日重置-只在周日0点重置)")
    private int queenResGrabRefreshTime;

    @FieldTypeAnnotation(desc = "活动结束处理状态")
    private boolean battleEndHandle;

    @FieldTypeAnnotation(desc = "榜单自动发放状态")
    private boolean rankReward;

    @FieldTypeAnnotation(desc = "资源点奖励自动发放状态")
    private boolean resGrabReward;

    @FieldTypeAnnotation(desc = "资源点占用率统计时间")
    private int lastStatTime;

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if(this.weekId != weekId) {
            this.weekId = weekId;
            setUpdateOption();
        }
    }

    public int getSystemGroupId() {
        return systemGroupId;
    }

    public void setSystemGroupId(int systemGroupId) {
        if(this.systemGroupId != systemGroupId) {
            this.systemGroupId = systemGroupId;
            setUpdateOption();
        }
    }

    public int getOpenDays() {
        return openDays;
    }

    public void setOpenDays(int openDays) {
        if(this.openDays != openDays) {
            this.openDays = openDays;
            setUpdateOption();
        }
    }

    public List<Long> getServerIdList() {
        return serverIdList;
    }

    public void setServerIdList(List<Long> serverIdList) {
        this.serverIdList = serverIdList;
        setUpdateOption();
    }

    public Map<Integer, ResourceServerGroup> getInnerGroupList() {
        return innerGroupList;
    }

    public void setInnerGroupList(Map<Integer, ResourceServerGroup> innerGroupList) {
        this.innerGroupList = innerGroupList;
    }

    public int getMaxGroupId() {
        return maxGroupId;
    }

    public void setMaxGroupId(int maxGroupId) {
        if(this.maxGroupId != maxGroupId) {
            this.maxGroupId = maxGroupId;
            setUpdateOption();
        }
    }

    public int getActiveNum() {
        return activeNum;
    }

    public void setActiveNum(int activeNum) {
        if(this.activeNum != activeNum) {
            this.activeNum = activeNum;
            setUpdateOption();
        }
    }

    public Map<Integer, Map<Integer, Long>> getNpcBlood() {
        return npcBlood;
    }

    public void setNpcBlood(Map<Integer, Map<Integer, Long>> npcBlood) {
        this.npcBlood = npcBlood;
        setUpdateOption();
    }

    public int getOfficeRefreshTime() {
        return officeRefreshTime;
    }

    public void setOfficeRefreshTime(int officeRefreshTime) {
        if(this.officeRefreshTime != officeRefreshTime) {
            this.officeRefreshTime = officeRefreshTime;
            setUpdateOption();
        }
    }

    public int getKingResGrabRefreshTime() {
        return kingResGrabRefreshTime;
    }

    public void setKingResGrabRefreshTime(int kingResGrabRefreshTime) {
        if(this.kingResGrabRefreshTime != kingResGrabRefreshTime) {
            this.kingResGrabRefreshTime = kingResGrabRefreshTime;
            setUpdateOption();
        }
    }

    public int getQueenResGrabRefreshTime() {
        return queenResGrabRefreshTime;
    }

    public void setQueenResGrabRefreshTime(int queenResGrabRefreshTime) {
        if(this.queenResGrabRefreshTime != queenResGrabRefreshTime) {
            this.queenResGrabRefreshTime = queenResGrabRefreshTime;
            setUpdateOption();
        }
    }

    public boolean isBattleEndHandle() {
        return battleEndHandle;
    }

    public void setBattleEndHandle(boolean battleEndHandle) {
        if(this.battleEndHandle != battleEndHandle) {
            this.battleEndHandle = battleEndHandle;
            setUpdateOption();
        }
    }

    public boolean isRankReward() {
        return rankReward;
    }

    public void setRankReward(boolean rankReward) {
        if(this.rankReward != rankReward) {
            this.rankReward = rankReward;
            setUpdateOption();
        }
    }

    public boolean isResGrabReward() {
        return resGrabReward;
    }

    public void setResGrabReward(boolean resGrabReward) {
        if(this.resGrabReward != resGrabReward) {
            this.resGrabReward = resGrabReward;
            setUpdateOption();
        }
    }

    public int getLastStatTime() {
        return lastStatTime;
    }

    public void setLastStatTime(int lastStatTime) {
        if(this.lastStatTime != lastStatTime) {
            this.lastStatTime = lastStatTime;
            setUpdateOption();
        }
    }
}
